LoadingDom = {
    onInit: function(){
        this.twidget = new TWidget();
        this.splash = document.getElementById("splash");
        this.loadWord = document.getElementById("loadWord");
        this.loadWordValue = this.loadWord.children[0];

        Object.assign(this.loadWord.style, {
            position: "absolute",
            color: "#000",
        });

        this.twidget.addMe(new CMelement(this.loadWord, 0, 30, 750));
        this.twidget.addMe(new FontMelement(this.loadWord, 25));
    },
    onUpdate: function(){
        this.loadWordValue.innerText = this.loadPerV.toFixed(0);
    },
    onFinish: function(){
        var fadeOutSplash = function () {
            var opacity = 1;
            var intervalId = setInterval(function () {
                opacity -= 0.08;
                splash.style.opacity = opacity.toFixed(2);
                if (opacity <= 0) {
                    clearInterval(intervalId);
                    splash.style.display = 'none';
                    window.utils.msgHub.emit(window.utils.macro.EVENTS.SPLASH_OUT);
                }
            }, 50);
        };
        utils.loader.once("load-end", fadeOutSplash, this);
    }
};